﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/HRManagerUI/HrManager.Master"
    AutoEventWireup="true" CodeBehind="Increment.aspx.cs" Inherits="HRM.UI.HRManagerUI.EmpSalary.SalaryIncrement" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
    <link href="../../../Styles/Salary/SalaryCss.css" rel="stylesheet" type="text/css" />
    <link href="../../../Scripts/htmlDatePicker.css" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/htmlDatePicker.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">

        function CheckValidation() {

            if (document.getElementById("<%=txtEmpCode.ClientID%>").value == "Please write Emp Code") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Employee Code!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtEmpCode.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtGross.ClientID%>").value == "0") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Employee Gross Salary !";
                document.getElementById("<%=txtGross.ClientID%>").focus();
                return false;
            }
            return true;


            //alert("abc");
        }
    </script>
    <div id="incrementTitle">
        Increment Employee's Salary Structure
    </div>
    <div style="text-align: center">
        <asp:Label runat="server" ID="msgLabel"></asp:Label>
    </div>
    <table class="totalInfoTB">
        <tr>
            <td style="width: 40%">
                <table class="incrementTB">
                    <tr>
                        <td class="Label">
                            Employee Code
                        </td>
                        <td class="Field">
                            <%--<input type="text" runat="server" value="Please write Emp Code" class="textboxinput"
                    id="txtEmpCode" onblur="if (this.value == '') {this.value = 'Please write Emp Code';}"
                    onfocus="if (this.value == 'Please write Emp Code') {this.value = '';}" />--%>
                            <asp:TextBox runat="server" value="Please write Emp Code" class="textboxinput" ID="txtEmpCode"
                                onblur="if (this.value == '') {this.value = 'Please write Emp Code';}" onfocus="if (this.value == 'Please write Emp Code') {this.value = '';}"
                                AutoPostBack="True" OnTextChanged="txtEmpCode_TextChanged"></asp:TextBox>
                            <span class="estaricStar">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="Label">
                            Basic Salary
                        </td>
                        <td class="Field">
                           <input type="text" runat="server" value="0" class="textboxinput" id="txtBasic" onblur="if (this.value == '') {this.value = '0';}"
                                onfocus="if (this.value == '0') {this.value = '';}" />
                    </tr>
                    <tr>
                        <td class="Label">
                            Medical Allowance
                        </td>
                        <td class="Field">
                            <input type="text" runat="server" value="0" class="textboxinput" id="txtMedical"
                                onblur="if (this.value == '') {this.value = '0';}" onfocus="if (this.value == '0') {this.value = '';}" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Label">
                            Residence Allowance
                        </td>
                        <td class="Field">
                            <input type="text" runat="server" value="0" class="textboxinput" id="txtResidence"
                                onblur="if (this.value == '') {this.value = '0';}" onfocus="if (this.value == '0') {this.value = '';}" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Label">
                            Transport Allowance
                        </td>
                        <td class="Field">
                            <input type="text" runat="server" value="0" class="textboxinput" id="txtTransport"
                                onblur="if (this.value == '') {this.value = '0';}" onfocus="if (this.value == '0') {this.value = '';}" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Label">
                            Profident Fund
                        </td>
                        <td class="Field">
                            <input type="text" runat="server" value="0" class="textboxinput" id="txtProfident"
                                onblur="if (this.value == '') {this.value = '0';}" onfocus="if (this.value == '0') {this.value = '';}" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Label">
                            Mobile Allowance
                        </td>
                        <td class="Field">
                            <input type="text" runat="server" value="0" class="textboxinput" id="txtMobile" onblur="if (this.value == '') {this.value = '0';}"
                                onfocus="if (this.value == '0') {this.value = '';}" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Label">
                            Others Allowance
                        </td>
                        <td class="Field">
                            <input type="text" runat="server" value="0" class="textboxinput" id="txtOthers" onblur="if (this.value == '') {this.value = '0';}"
                                onfocus="if (this.value == '0') {this.value = '';}" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Label">
                            Gross Salary
                        </td>
                        <td class="Field">
                            <input type="text" runat="server" value="0" class="textboxinput" id="txtGross" onblur="if (this.value == '') {this.value = '0';}"
                                onfocus="if (this.value == '0') {this.value = '';}" /><span class="estaricStar">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="Label">
                            Date
                        </td>
                        <td class="Field">
                            <%-- <input type="text" runat="server" id="txtDate" class="textboxinput" readonly onclick="GetDate(this);" />--%>
                            <input type="text" runat="server" value="Please Select a Date" class="textboxinput"
                                id="txtDate" onblur="if (this.value == '') {this.value = 'Please Select a Date';}"
                                onfocus="if (this.value == 'Please Select a Date') {this.value = '';}" readonly
                                onclick="GetDate(this);" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Label">
                            Total Increment
                        </td>
                        <td class="Field">
                            <input type="text" runat="server" value="0" class="textboxinput" id="txtTotalIncrement"
                                onblur="if (this.value == '') {this.value = '0';}" onfocus="if (this.value == '0') {this.value = '';}" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <input id="Submit1" type="submit" runat="server" class="btnCss" value="Add Increment"
                                onclick="return CheckValidation()" onserverclick="SaveIncrement" />
                        </td>
                    </tr>
                </table>
            </td>
            <td style="width: 50%" valign="top">
                <table class="generalEmpInfo" style="height: 100%" runat="server" id="generalEmpInfo">
                    <tr>
                        <td colspan="2" class="incrementTitle">
                            Employee Status&nbsp;<asp:Label 
                                runat="server" ID="lblEmpStatus" BorderStyle="Double" Font-Bold="True" 
                                ForeColor="Red"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="lebelTD">
                            Employee's Name :
                        </td>
                        <td class="lebellTD">
                            <asp:Label runat="server" ID="lblempName"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="lebelTD">
                            Designation :
                        </td>
                        <td class="lebellTD">
                            <asp:Label runat="server" ID="lblDesignation"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="lebelTD">
                            Project :
                        </td>
                        <td class="lebellTD">
                            <asp:Label runat="server" ID="lblProject"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="lebelTD">
                            Joining Date :
                        </td>
                        <td class="lebellTD">
                            <asp:Label runat="server" ID="lblJoiningDate"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="incrementTitle">
                            Last Evaluation Information
                        </td>
                        
                    </tr>
                    <tr>
                        <td class="lebelTD">
                           Evaluated By : 
                        </td>
                        <td class="lebellTD">
                            <asp:Label runat="server" ID="lblEvaluatedBy"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="lebelTD">
                            Evaluation Date :
                        </td>
                        <td class="lebellTD">
                            <asp:Label runat="server" ID="lblEvaDate"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="lebelTD">
                            Skill :
                        </td>
                        <td class="lebellTD">
                            <img runat="server" id="skillImage" class="imgEval"/>
                            <span class="fontspan"> <asp:Label runat="server" ID="lblSkill"></asp:Label></span>
                           
                          
                        </td>
                    </tr>
                    <tr>
                       
                        <td class="lebelTD">
                           Punctuality :
                        </td>
                        <td class="lebellTD">
                          
                           <img runat="server" id="puncImage" class="imgEval"/>
                            <span class="fontspan"> <asp:Label runat="server" ID="lblPunctuality"></asp:Label></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="lebelTD">
                            Communication :
                        </td>
                        <td class="lebellTD">
                          
                           <img runat="server" id="commImage" class="imgEval"/>
                            <span class="fontspan"> <asp:Label runat="server" ID="lblCommunication"></asp:Label></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="lebelTD">
                            Comments :
                        </td>
                        <td class="lebellTD">
                            <asp:Label runat="server" ID="lblComments" CssClass="lblComment"></asp:Label>
                        </td>
                    </tr>
                </table>
            </td>
            <td valign="top" align="right" runat="server" id="imgTD">
                <asp:Image ID="empImage" runat="server" CssClass="empImage" />
            </td>
        </tr>
    </table>
    <div id="incrementshowDiv" runat="server">
        <fieldset>
            <legend>
                <asp:Label runat="server" ID="countIncrement"></asp:Label></legend>
            <asp:GridView runat="server" ID="salaryIncrementGdv" Width="100%" BackColor="White"
                BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" OnPageIndexChanging="salaryIncrementGdv_PageIndexChanging"
                CssClass="GridviewStyle" AutoGenerateColumns="False" AllowPaging="True" PageSize="3">
                <AlternatingRowStyle />
                <Columns>
                    <asp:BoundField DataField="Basic" HeaderText="Basic Salary" />
                    <asp:BoundField DataField="Medical" HeaderText="Medical" />
                    <asp:BoundField DataField="Residence" HeaderText="Residence" />
                    <asp:BoundField DataField="Transport" HeaderText="Transport" />
                    <asp:BoundField DataField="Mobile" HeaderText="Mobile" />
                    <asp:BoundField DataField="Gross" HeaderText="Gross salary" />
                    <asp:BoundField DataField="date" HeaderText="Date" />
                    <asp:BoundField DataField="TotalIncrement" HeaderText="Increment (TK)" />
                </Columns>
                <FooterStyle CssClass="GridViewFooterStyle" BackColor="White" ForeColor="#000066" />
                <HeaderStyle Font-Bold="True" CssClass="GridViewHeaderStyle" />
                <PagerStyle CssClass="GridViewFooterStyle" HorizontalAlign="Center" />
                <RowStyle ForeColor="#000066" />
                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#007DBB" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#00547E" />
            </asp:GridView>
        </fieldset>
    </div>
</asp:Content>
